package com.qingcloud.adminbackend.entity.usergroup;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 新用户组
 * </p>
 *
 * @author wangjinnan
 * @since 2018-11-15
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("sys_usergroup")
public class SysUsergroup extends Model<SysUsergroup> {

    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.ASSIGN_UUID)
    @ApiModelProperty(value = "用户组ID，修改的时候需要传入")
    private String id;

    /**
     * 所属组织
     */
    @ApiModelProperty(value = "所属组织ID", example = "f4c09b0afe174c5cb6875004276049a0")
    private String orgId;

    /**
     * 用户组名称
     */
    @ApiModelProperty(value = "用户组名称", example = "研发组")
    @TableField(value = "`name`")
    private String name;

    /**
     * 用户组所有用户ID
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "用户组下用户信息")
    private List<SysUsergroupUser> userList;

    /**
     * 描述
     */
    @ApiModelProperty(value = "描述", example = "描述")
    private String description;

    @ApiModelProperty(value = "应用ID")
    private Integer appId;

    /**
     * 描述
     */
    @ApiModelProperty(value = "删除标志 0:正常；1:已经删除", example = "0")
    private Integer deleteFlag = 0;

    @ApiModelProperty(hidden = true)
    private LocalDateTime createDt;

    @ApiModelProperty(hidden = true)
    private String createBy;

    @ApiModelProperty(hidden = true)
    private LocalDateTime modifyDt;

    @ApiModelProperty(hidden = true)
    private String modifyBy;

}
